package com.weds.edwx .service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.util.List;

import com.weds.core.base.BaseService;
import com.weds.edwx.mapper .DineUserRoleMapper;
import com.weds.edwx.entity .DineUserRoleEntity;

/**
 * @Author sxm
 * @Description DineUserRole管理
 * @Date 2020-04-06
 */
@Service
public class DineUserRoleService extends BaseService {

	@Autowired
	private DineUserRoleMapper dineUserRoleMapper;

	private Logger log = LogManager.getLogger();

	public int deleteByPrimaryKey(Long userSerial, String role) {
		return dineUserRoleMapper.deleteByPrimaryKey(userSerial, role);
	}

	public int insert(DineUserRoleEntity record) {
		return dineUserRoleMapper.insert(record);
	}

	public int insertSelective(DineUserRoleEntity record) {
		return dineUserRoleMapper.insertSelective(record);
	}

	public DineUserRoleEntity selectByPrimaryKey(Long userSerial, String role) {
		return dineUserRoleMapper.selectByPrimaryKey(userSerial, role);
	}

	public int selectAllowDineUser(){
		return dineUserRoleMapper.selectAllowDineUser();
	}

	public int updateByPrimaryKeySelective(DineUserRoleEntity record) {
		return dineUserRoleMapper.updateByPrimaryKeySelective(record);
	}

	public int updateByPrimaryKey(DineUserRoleEntity record) {
		return dineUserRoleMapper.updateByPrimaryKey(record);
	}

    	public List<DineUserRoleEntity> selectListByEntity(DineUserRoleEntity record) {
		return dineUserRoleMapper.selectListByEntity(record);
	}
	
	

        public int deleteBatchByKeys(List<DineUserRoleEntity> list) {
        return dineUserRoleMapper.deleteBatchByKeys(list);
    }
    
    	public int insertBatch(List<DineUserRoleEntity> list) {
		return dineUserRoleMapper.insertBatch(list);
	}
	}
